package org.laobai.goods.cilent;

import org.laobai.common.struct.Result;
import org.laobai.goods.entity.Goods;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Set;

@FeignClient(name = "goods-service",path = "/goods")
public interface GoodsClient {

    @GetMapping("update-goods-num/{id}/{num}")
    Result updateGoodsNum(@PathVariable("id") Long id, @PathVariable("num") Integer num);

    @PostMapping("/ids")
    List<Goods> getByIds(@RequestBody Set<Long> ids);
}
